﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Alos.Common;
using Alos.Entity;
using Alos.IService;

namespace Alos.LanClass.Api
{
    /// <summary>
    /// 学生行为记录表
    /// </summary>
    public class ReStudentClassRecordController : ApiController
    {
        IReStudentClassRecordService ReStudentClassRecordService;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_IReTeachRecordService"></param>
        public ReStudentClassRecordController(IReStudentClassRecordService _IReStudentClassRecordService)
        {
            ReStudentClassRecordService = _IReStudentClassRecordService;   
        }
        /// <summary>
        /// 添加教师行为记录
        /// <param name="ReTeacherRecord">教师行为记录</param>
        /// </summary>
        [HttpPost]
        [Route("api/ReStudentClassRecord/CreateReStudentClassRecord")]
        public JsonRtn<dynamic> CreateReStudentClassRecord([FromBody]ReStudentClassRecord ReStudentClassRecord)
        {
            var jsRtn = new JsonRtn<dynamic>();
            jsRtn.message = ReStudentClassRecordService.CreateReStudentClassRecord(ReStudentClassRecord) > 0 ? "添加成功" : "添加失败";
            return jsRtn;
        }
    }
}
